        <!DOCTYPE html>
        <html>
        <head>
                <meta charset="utf-8">
        <title>Settings class / box2d Library / Dart Documentation</title>
        <link rel="stylesheet" type="text/css"
            href="../styles.css">
        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet" type="text/css">
        <link rel="shortcut icon" href="../favicon.ico">
        
        </head>
        <body data-library="box2d" data-type="Settings">
        <div class="page">
        <div class="header">
          <a href="../index.html"><div class="logo"></div></a>
          <a href="../index.html">Dart Documentation</a>
         &rsaquo; <a href="../box2d.html">box2d</a> &rsaquo; <a href="../box2d/Settings.html">Settings</a>        <div id="search-box">
          <input type="search" name="q" id="q" autocomplete="off"
              class="search-input" placeholder="Search API">
        </div>
        
      </div>
      <div class="drop-down" id="drop-down"></div>
      
        <div class="nav">
        
</div>
<div class="content">
        <h2><strong>Settings</strong>
          class
        </h2>
        
<button id="show-inherited" class="show-inherited">Hide inherited</button>
<div class="doc">
<pre class="source">
class Settings {
 /** Size that pool stacks are initialized to. */
 static const int CONTACT_STACK_INIT_SIZE = 10;

 /** A "close to Zero" num epsilon value for use */
 static const num EPSILON = .0000001192;

 /**
  * Maximum number of contacts to be handled to solve a TimeOfImpact island.
  */
 static const int MAX_TIME_OF_IMPACT_CONTACTS = 32;

 /**
  * A body cannot sleep if its linear velocity is above this tolerance.
  */
 static const num LINEAR_SLEEP_TOLERANCE = 0.01;

 /**
  * The maximum linear position correction used when solving constraints.
  * This helps to prevent overshoot.
  */
 static const num MAX_LINEAR_CORRECTION = 0.2;

 /**
  * A body cannot sleep if its angular velocity is above this tolerance.
  */
 static const num ANGULAR_SLEEP_TOLERANCE = 2.0 / 180.0 * math.PI;

 static const num TIME_TO_SLEEP = 0.5;

 static const int TREE_REBALANCE_STEPS = 4;

 static const int MAX_INTEGER = 2147483647;

 static const num SMALL_NUMBER = .000000000001;
 static const num BIG_NUMBER = 99999999999999.0;

 /**
  * A small length used as a collision and constant tolerance. Usually it
  * is chosen to be numerically significant, but visually insignificant.
  */
 static const num LINEAR_SLOP = 0.005;

 /**
  * The radius of the polygon/edge shape skin. This should not be modified.
  * Making this smaller means polygons will have and insufficient for
  * continuous collision. Making it larger may create artifacts for vertex
  * collision.
  */
 static const num POLYGON_RADIUS = 2.0 * LINEAR_SLOP;

 static const num VELOCITY_THRESHOLD = 1;

 /**
  * Fattens bounding boxes in the dynamic tree by this amount. Allows proxies
  * to move by small amounts without needing to adjust the tree. This value is
  * in meters.
  */
 static const num BOUNDING_BOX_EXTENSION = .1;

 /**
  * This is used to fatten AABBs in the dynamic tree. This is used to predict
  * the future position based on the current displacement.
  * This is a dimensionless multiplier.
  */
 static const num BOUNDING_BOX_MULTIPLIER = 2;

 /**
  * This scale factor controls how fast overlap is resolved. Ideally this
  * would be 1 so that overlap is removed in one time step. However using
  * values close to 1 often lead to overshoot.
  */
 static const num CONTACT_BAUMGARTE = 0.2;

 /**
  * The maximum linear velocity of a body. This limit is very large and is
  * used to prevent numerical problems. You shouldn't need to adjust this.
  */
 static const num MAX_TRANSLATION = 2.0;
 static const num MAX_TRANSLATION_SQUARED = MAX_TRANSLATION * MAX_TRANSLATION;

 /**
  * The maximum angular velocity of a body. This limit is very large and is
  * used to prevent numerical problems. You shouldn't need to adjust this.
  */
 static const num MAX_ROTATION = 0.5 * math.PI;
 static const num MAX_ROTATION_SQUARED = MAX_ROTATION * MAX_ROTATION;

 /**
  * The maximum number of contact points between two convex shapes.
  */
 static const int MAX_MANIFOLD_POINTS = 2;

 /**
  * A small angle used as a collision and constraint tolerance. Usually it is
  * chosen to be numerically significant, but visually insignificant.
  */
 static const num ANGULAR_SLOP = (2.0 / 180.0 * math.PI);

 /**
  * The maximum angular position correction used when solving constraints.
  * This helps to prevent overshoot.
  */
 static const num MAX_ANGULAR_CORRECTION = (8.0 / 180.0 * math.PI);

 /**
  * The maximum number of vertices on a convex polygon.
  */
 static const int MAX_POLYGON_VERTICES = 8;

 /**
  * Friction mixing law.
  */
 static num mixFriction(num friction1, num friction2) {
   return math.sqrt(friction1 * friction2);
 }

 /**
  * Restitution mixing law.
  */
 static num mixRestitution(num restitution1, num restitution2) {
   return restitution1 &gt; restitution2 ? restitution1 : restitution2;
 }
}
</pre>
</div>
<div>
<h3>Static Properties</h3>
<div class="field"><h4 id="ANGULAR_SLEEP_TOLERANCE">
<button class="show-code">Code</button>
const num         <strong>ANGULAR_SLEEP_TOLERANCE</strong> <a class="anchor-link"
            href="#ANGULAR_SLEEP_TOLERANCE"
            title="Permalink to Settings.ANGULAR_SLEEP_TOLERANCE">#</a>
        </h4>
        <div class="doc">
<pre class="source">
ANGULAR_SLEEP_TOLERANCE = 2.0 / 180.0 * math.PI
</pre>
</div>
</div>
<div class="field"><h4 id="ANGULAR_SLOP">
<button class="show-code">Code</button>
const num         <strong>ANGULAR_SLOP</strong> <a class="anchor-link"
            href="#ANGULAR_SLOP"
            title="Permalink to Settings.ANGULAR_SLOP">#</a>
        </h4>
        <div class="doc">
<pre class="source">
ANGULAR_SLOP = (2.0 / 180.0 * math.PI)
</pre>
</div>
</div>
<div class="field"><h4 id="BIG_NUMBER">
<button class="show-code">Code</button>
const num         <strong>BIG_NUMBER</strong> <a class="anchor-link"
            href="#BIG_NUMBER"
            title="Permalink to Settings.BIG_NUMBER">#</a>
        </h4>
        <div class="doc">
<pre class="source">
BIG_NUMBER = 99999999999999.0
</pre>
</div>
</div>
<div class="field"><h4 id="BOUNDING_BOX_EXTENSION">
<button class="show-code">Code</button>
const num         <strong>BOUNDING_BOX_EXTENSION</strong> <a class="anchor-link"
            href="#BOUNDING_BOX_EXTENSION"
            title="Permalink to Settings.BOUNDING_BOX_EXTENSION">#</a>
        </h4>
        <div class="doc">
<pre class="source">
BOUNDING_BOX_EXTENSION = .1
</pre>
</div>
</div>
<div class="field"><h4 id="BOUNDING_BOX_MULTIPLIER">
<button class="show-code">Code</button>
const num         <strong>BOUNDING_BOX_MULTIPLIER</strong> <a class="anchor-link"
            href="#BOUNDING_BOX_MULTIPLIER"
            title="Permalink to Settings.BOUNDING_BOX_MULTIPLIER">#</a>
        </h4>
        <div class="doc">
<pre class="source">
BOUNDING_BOX_MULTIPLIER = 2
</pre>
</div>
</div>
<div class="field"><h4 id="CONTACT_BAUMGARTE">
<button class="show-code">Code</button>
const num         <strong>CONTACT_BAUMGARTE</strong> <a class="anchor-link"
            href="#CONTACT_BAUMGARTE"
            title="Permalink to Settings.CONTACT_BAUMGARTE">#</a>
        </h4>
        <div class="doc">
<pre class="source">
CONTACT_BAUMGARTE = 0.2
</pre>
</div>
</div>
<div class="field"><h4 id="CONTACT_STACK_INIT_SIZE">
<button class="show-code">Code</button>
const int         <strong>CONTACT_STACK_INIT_SIZE</strong> <a class="anchor-link"
            href="#CONTACT_STACK_INIT_SIZE"
            title="Permalink to Settings.CONTACT_STACK_INIT_SIZE">#</a>
        </h4>
        <div class="doc">
<pre class="source">
CONTACT_STACK_INIT_SIZE = 10
</pre>
</div>
</div>
<div class="field"><h4 id="EPSILON">
<button class="show-code">Code</button>
const num         <strong>EPSILON</strong> <a class="anchor-link"
            href="#EPSILON"
            title="Permalink to Settings.EPSILON">#</a>
        </h4>
        <div class="doc">
<pre class="source">
EPSILON = .0000001192
</pre>
</div>
</div>
<div class="field"><h4 id="LINEAR_SLEEP_TOLERANCE">
<button class="show-code">Code</button>
const num         <strong>LINEAR_SLEEP_TOLERANCE</strong> <a class="anchor-link"
            href="#LINEAR_SLEEP_TOLERANCE"
            title="Permalink to Settings.LINEAR_SLEEP_TOLERANCE">#</a>
        </h4>
        <div class="doc">
<pre class="source">
LINEAR_SLEEP_TOLERANCE = 0.01
</pre>
</div>
</div>
<div class="field"><h4 id="LINEAR_SLOP">
<button class="show-code">Code</button>
const num         <strong>LINEAR_SLOP</strong> <a class="anchor-link"
            href="#LINEAR_SLOP"
            title="Permalink to Settings.LINEAR_SLOP">#</a>
        </h4>
        <div class="doc">
<pre class="source">
LINEAR_SLOP = 0.005
</pre>
</div>
</div>
<div class="field"><h4 id="MAX_ANGULAR_CORRECTION">
<button class="show-code">Code</button>
const num         <strong>MAX_ANGULAR_CORRECTION</strong> <a class="anchor-link"
            href="#MAX_ANGULAR_CORRECTION"
            title="Permalink to Settings.MAX_ANGULAR_CORRECTION">#</a>
        </h4>
        <div class="doc">
<pre class="source">
MAX_ANGULAR_CORRECTION = (8.0 / 180.0 * math.PI)
</pre>
</div>
</div>
<div class="field"><h4 id="MAX_INTEGER">
<button class="show-code">Code</button>
const int         <strong>MAX_INTEGER</strong> <a class="anchor-link"
            href="#MAX_INTEGER"
            title="Permalink to Settings.MAX_INTEGER">#</a>
        </h4>
        <div class="doc">
<pre class="source">
MAX_INTEGER = 2147483647
</pre>
</div>
</div>
<div class="field"><h4 id="MAX_LINEAR_CORRECTION">
<button class="show-code">Code</button>
const num         <strong>MAX_LINEAR_CORRECTION</strong> <a class="anchor-link"
            href="#MAX_LINEAR_CORRECTION"
            title="Permalink to Settings.MAX_LINEAR_CORRECTION">#</a>
        </h4>
        <div class="doc">
<pre class="source">
MAX_LINEAR_CORRECTION = 0.2
</pre>
</div>
</div>
<div class="field"><h4 id="MAX_MANIFOLD_POINTS">
<button class="show-code">Code</button>
const int         <strong>MAX_MANIFOLD_POINTS</strong> <a class="anchor-link"
            href="#MAX_MANIFOLD_POINTS"
            title="Permalink to Settings.MAX_MANIFOLD_POINTS">#</a>
        </h4>
        <div class="doc">
<pre class="source">
MAX_MANIFOLD_POINTS = 2
</pre>
</div>
</div>
<div class="field"><h4 id="MAX_POLYGON_VERTICES">
<button class="show-code">Code</button>
const int         <strong>MAX_POLYGON_VERTICES</strong> <a class="anchor-link"
            href="#MAX_POLYGON_VERTICES"
            title="Permalink to Settings.MAX_POLYGON_VERTICES">#</a>
        </h4>
        <div class="doc">
<pre class="source">
MAX_POLYGON_VERTICES = 8
</pre>
</div>
</div>
<div class="field"><h4 id="MAX_ROTATION">
<button class="show-code">Code</button>
const num         <strong>MAX_ROTATION</strong> <a class="anchor-link"
            href="#MAX_ROTATION"
            title="Permalink to Settings.MAX_ROTATION">#</a>
        </h4>
        <div class="doc">
<pre class="source">
MAX_ROTATION = 0.5 * math.PI
</pre>
</div>
</div>
<div class="field"><h4 id="MAX_ROTATION_SQUARED">
<button class="show-code">Code</button>
const num         <strong>MAX_ROTATION_SQUARED</strong> <a class="anchor-link"
            href="#MAX_ROTATION_SQUARED"
            title="Permalink to Settings.MAX_ROTATION_SQUARED">#</a>
        </h4>
        <div class="doc">
<pre class="source">
MAX_ROTATION_SQUARED = MAX_ROTATION * MAX_ROTATION
</pre>
</div>
</div>
<div class="field"><h4 id="MAX_TIME_OF_IMPACT_CONTACTS">
<button class="show-code">Code</button>
const int         <strong>MAX_TIME_OF_IMPACT_CONTACTS</strong> <a class="anchor-link"
            href="#MAX_TIME_OF_IMPACT_CONTACTS"
            title="Permalink to Settings.MAX_TIME_OF_IMPACT_CONTACTS">#</a>
        </h4>
        <div class="doc">
<pre class="source">
MAX_TIME_OF_IMPACT_CONTACTS = 32
</pre>
</div>
</div>
<div class="field"><h4 id="MAX_TRANSLATION">
<button class="show-code">Code</button>
const num         <strong>MAX_TRANSLATION</strong> <a class="anchor-link"
            href="#MAX_TRANSLATION"
            title="Permalink to Settings.MAX_TRANSLATION">#</a>
        </h4>
        <div class="doc">
<pre class="source">
MAX_TRANSLATION = 2.0
</pre>
</div>
</div>
<div class="field"><h4 id="MAX_TRANSLATION_SQUARED">
<button class="show-code">Code</button>
const num         <strong>MAX_TRANSLATION_SQUARED</strong> <a class="anchor-link"
            href="#MAX_TRANSLATION_SQUARED"
            title="Permalink to Settings.MAX_TRANSLATION_SQUARED">#</a>
        </h4>
        <div class="doc">
<pre class="source">
MAX_TRANSLATION_SQUARED = MAX_TRANSLATION * MAX_TRANSLATION
</pre>
</div>
</div>
<div class="field"><h4 id="POLYGON_RADIUS">
<button class="show-code">Code</button>
const num         <strong>POLYGON_RADIUS</strong> <a class="anchor-link"
            href="#POLYGON_RADIUS"
            title="Permalink to Settings.POLYGON_RADIUS">#</a>
        </h4>
        <div class="doc">
<pre class="source">
POLYGON_RADIUS = 2.0 * LINEAR_SLOP
</pre>
</div>
</div>
<div class="field"><h4 id="SMALL_NUMBER">
<button class="show-code">Code</button>
const num         <strong>SMALL_NUMBER</strong> <a class="anchor-link"
            href="#SMALL_NUMBER"
            title="Permalink to Settings.SMALL_NUMBER">#</a>
        </h4>
        <div class="doc">
<pre class="source">
SMALL_NUMBER = .000000000001
</pre>
</div>
</div>
<div class="field"><h4 id="TIME_TO_SLEEP">
<button class="show-code">Code</button>
const num         <strong>TIME_TO_SLEEP</strong> <a class="anchor-link"
            href="#TIME_TO_SLEEP"
            title="Permalink to Settings.TIME_TO_SLEEP">#</a>
        </h4>
        <div class="doc">
<pre class="source">
TIME_TO_SLEEP = 0.5
</pre>
</div>
</div>
<div class="field"><h4 id="TREE_REBALANCE_STEPS">
<button class="show-code">Code</button>
const int         <strong>TREE_REBALANCE_STEPS</strong> <a class="anchor-link"
            href="#TREE_REBALANCE_STEPS"
            title="Permalink to Settings.TREE_REBALANCE_STEPS">#</a>
        </h4>
        <div class="doc">
<pre class="source">
TREE_REBALANCE_STEPS = 4
</pre>
</div>
</div>
<div class="field"><h4 id="VELOCITY_THRESHOLD">
<button class="show-code">Code</button>
const num         <strong>VELOCITY_THRESHOLD</strong> <a class="anchor-link"
            href="#VELOCITY_THRESHOLD"
            title="Permalink to Settings.VELOCITY_THRESHOLD">#</a>
        </h4>
        <div class="doc">
<pre class="source">
VELOCITY_THRESHOLD = 1
</pre>
</div>
</div>
</div>
<div>
<h3>Static Methods</h3>
<div class="method"><h4 id="mixFriction">
<button class="show-code">Code</button>
num <strong>mixFriction</strong>(num friction1, num friction2) <a class="anchor-link" href="#mixFriction"
              title="Permalink to Settings.mixFriction">#</a></h4>
<div class="doc">
<p>Friction mixing law.</p>
<pre class="source">
static num mixFriction(num friction1, num friction2) {
 return math.sqrt(friction1 * friction2);
}
</pre>
</div>
</div>
<div class="method"><h4 id="mixRestitution">
<button class="show-code">Code</button>
num <strong>mixRestitution</strong>(num restitution1, num restitution2) <a class="anchor-link" href="#mixRestitution"
              title="Permalink to Settings.mixRestitution">#</a></h4>
<div class="doc">
<p>Restitution mixing law.</p>
<pre class="source">
static num mixRestitution(num restitution1, num restitution2) {
 return restitution1 &gt; restitution2 ? restitution1 : restitution2;
}
</pre>
</div>
</div>
</div>
        </div>
        <div class="clear"></div>
        </div>
        <div class="footer">
          
        </div>
        <script async src="../client-live-nav.js"></script>
        </body></html>
        
